<template>
  <button @click="getParentFunc($parent)">执行父组件中的函数</button>
</template>
<script setup lang="ts">

let emits = defineEmits(['test-event']);

function getParentFunc($parent:any) {
  console.log("子组件")
  emits('test-event',"")
}
</script>